package xcmg.device.dao.mapper.announcement;


import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.announcement.BasicAnnouncementAuthDO;
import xcmg.device.service.vo.announcement.BasicAnnouncementAuthVO;

import java.util.List;

@Mapper
public interface BasicAnnouncementAuthMapper {

    int deleteByPrimaryKey(String id);

    int deleteByIds(@Param("ids") List<String> ids);

    int insert(BasicAnnouncementAuthDO record);

    BasicAnnouncementAuthDO selectByPrimaryKey(String id);

    int update(BasicAnnouncementAuthDO record);

    List<BasicAnnouncementAuthVO> listDealer(BasicAnnouncementAuthVO condition);

    List<BasicAnnouncementAuthVO> listUser(BasicAnnouncementAuthVO condition);

    List<BasicAnnouncementAuthVO> listCustomer(BasicAnnouncementAuthVO condition);

    List<String> listReceiverNames(@Param("mainId") String mainId, @Param("authType") Integer authType);

    /**
     * 获取父级部门的deptId
     *
     * @param deptId
     * @return
     */
    String getParentDeptId(@Param("deptId") String deptId);
}